<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>贷款管理后台系统</title>
    <link rel="stylesheet" href="../../static/layer/css/layui.css" media="all"/>
    <link rel="stylesheet" href="../../static/css/font-awesome.min.css" media="all">
    <link rel="stylesheet" href="../../static/ucss/admin/app.css" media="all"/>
    <link rel="stylesheet" href="../../static/ucss/admin/themes/default.css" media="all" id="skin" shs-skin/>
</head>
<style>

</style>
<body class="kit-theme">
<div class="layui-layout layui-layout-admin kit-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">贷款辅助平台后台设置</div>
        <div class="layui-logo kit-logo-mobile">SHS</div>
        <!--<ul class="layui-nav layui-layout-left kit-nav">
            <li class="layui-nav-item"><a href="javascript:;">控制台</a></li>
            <li class="layui-nav-item">
                <a href="javascript:;">其它系统</a>
                <dl class="layui-nav-child">
                    <dd><a href="javascript:;">邮件管理</a></dd>
                    <dd><a href="javascript:;">消息管理</a></dd>
                    <dd><a href="javascript:;">授权管理</a></dd>
                </dl>
            </li>
        </ul>-->
        <ul class="layui-nav layui-layout-right kit-nav">
            <li class="layui-nav-item">
                <a href="javascript:;"><i class="fa fa-tachometer" aria-hidden="true"></i> 皮肤</a>
                </a>
                <dl class="layui-nav-child skin">
                    <dd><a href="javascript:;" data-skin="default" style="color:#393D49 !important;"><i
                            class="layui-icon">&#xe658;</i> 默认</a></dd>
                    <dd><a href="javascript:;" data-skin="orange" style="color:#ff6700 !important;"><i
                            class="layui-icon">&#xe658;</i> 橘子橙</a></dd>
                    <dd><a href="javascript:;" data-skin="green" style="color:#00a65a !important;"><i
                            class="layui-icon">&#xe658;</i> 原谅绿</a></dd>
                    <dd><a href="javascript:;" data-skin="pink" style="color:#FA6086 !important;"><i
                            class="layui-icon">&#xe658;</i> 少女粉</a></dd>
                    <dd><a href="javascript:;" data-skin="blue.1" style="color:#00c0ef !important;"><i
                            class="layui-icon">&#xe658;</i> 天空蓝</a></dd>
                    <dd><a href="javascript:;" data-skin="red" style="color:#dd4b39 !important;"><i
                            class="layui-icon">&#xe658;</i> 枫叶红</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <!--<img class="layui-nav-img"> --><span class="userName"></span>
                    <!--<img src="../../static/images/photoimg.gif" class="layui-nav-img"> Shs-->
                </a>
                <dl class="layui-nav-child">
                   <!-- <dd><a href="javascript:changeTab(0);"><span>消息通知</span></a></dd>-->
                    <dd class="AUTH-MENU_ZHSZ"><a href="javascript:changeTab(1);"><span>用户管理</span></a></dd>
                    <dd ><a href="javascript:changeTab(2);"><span>账户设置</span></a></dd>

                    <!--<dd class="AUTH-MENU_FSGG"><a href="javascript:changeTab(3);"><span>发送公告</span></a></dd>
                    <dd class="AUTH-MENU_JCSZ"><a href="javascript:changeTab(7);"><span>行业配置</span></a></dd>-->
                    <dd class="AUTH-MENU_JSSZ"><a href="javascript:changeTab(9);"><span>角色设置</span></a></dd>
                    <dd class="AUTH-MENU_HTMB"><a href="javascript:changeTab(11);"><span>模板管理</span></a></dd>
                    <dd class="AUTH-MENU_RZCK"><a href="javascript:changeTab(12);"><span>操作记录</span></a></dd>
                    <dd><a href="../../logout">退出登录</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item"><a href="../../main/index"><i class="fa fa-reply" aria-hidden="true"></i> 返回</a>
            </li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black kit-side">
        <div class="layui-side-scroll">
            <div class="kit-side-fold"><i class="fa fa-navicon" aria-hidden="true"></i></div>
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" id="layui-nav-tree" lay-filter="kitNavbar" kit-navbar>
                <!--<li class="layui-nav-item">
                    <a id="item0" href="javascript:;" data-options="{url:'message/message.html',icon:'fa-bell-o',title:'消息通知',id:'0'}" kit-target><i class="fa fa-bell-o" aria-hidden="true"></i><span> 消息通知</span></a>
                </li>-->
                <li class="AUTH-MENU_YHGL layui-nav-item">
                    <a id="item1" href="javascript:;" data-options="{url:'personnel/personnel_management.html',icon:'fa-users',title:'用户管理',id:'1'}" kit-target><i class="fa fa-users" aria-hidden="true"></i><span> 用户管理</span></a>
                </li>
                <li class="layui-nav-item">
                    <a id="item2" href="javascript:;" data-options="{url:'account/account_setting.html',icon:'fa-podcast',title:'账户设置',id:'2'}" kit-target><i class="fa fa-podcast" aria-hidden="true"></i><span> 账户设置</span></a>
                </li>
             <!--   <li class="AUTH-MENU_FSGG layui-nav-item">
                    <a id="item3" href="javascript:;" data-options="{url:'message/sendGg.html',icon:'fa-pencil-square-o',title:'发送公告',id:'3'}" kit-target><i class="fa fa-pencil-square-o" aria-hidden="true"></i><span> 发送公告</span></a>-->
                </li>
            <!--    <li class="AUTH-MENU_JCSZ layui-nav-item">
                    <a id="item7" href="javascript:;" data-options="{url:'basics/basics_setting.html',icon:'fa-cogs',title:'行业配置',id:'7'}" kit-target><i class="fa fa-cogs" aria-hidden="true"></i><span> 行业配置</span></a>
                </li>-->
<!--                <li class="AUTH-MENU_SDBSZ layui-nav-item">
                    <a id="item8" href="javascript:;" data-options="{url:'hydropower/water_electricity.html',icon:'fa-bolt',title:'水电表设置',id:'8'}" kit-target><i class="fa fa-bolt" aria-hidden="true"></i><span> 水电表设置</span></a>
                </li>-->
                <li class="AUTH-MENU_JSSZ layui-nav-item">
                    <a id="item9" href="javascript:;" data-options="{url:'role/role_setting.html',icon:'fa-user-o',title:'角色设置',id:'9'}" kit-target><i class="fa fa-user-o" aria-hidden="true"></i><span> 角色设置</span></a>
                </li>
                <li class="AUTH-MENU_HTMB layui-nav-item">
                    <a id="item11" href="javascript:;" data-options="{url:'contract/contract_template.html',icon:'fa-pencil-square-o',title:'模板管理',id:'11'}" kit-target><i class="fa fa-pencil-square-o" aria-hidden="true"></i><span> 模板管理</span></a>
                </li>
                <li class="AUTH-MENU_RZCK layui-nav-item">
                    <a id="item12" href="javascript:;" data-options="{url:'record/Systemlog.html',icon:'fa-user-o',title:'操作记录',id:'12'}" kit-target><i class="fa fa-id-badge" aria-hidden="true"></i><span> 操作记录</span></a>
                </li>
            </ul>
        </div>
    </div>
    <div class="layui-body" id="container">
        <!-- 内容主体区域 -->
        <div style="padding: 15px;"><i class="layui-icon layui-anim layui-anim-rotate layui-anim-loop">&#xe63e;</i>
            请稍等...
        </div>
    </div>
    <div class="layui-footer">
        <!-- 底部固定区域 -->
        2018 &copy;
        <a href="javascript:;">dkfz.com</a>
    </div>
</div>
<script type="text/javascript" src="../../static/js/common/queryUtils.js"></script>
<script type="text/javascript" src="../../static/layer/layui.js"></script>
<script>
    var message;
    var $;
    layui.config({
        base: '../../static/ujs/admin/'
    }).use(['app', 'message'], function () {
        var app = layui.app,
            layer = layui.layer;
        $ = layui.jquery;

        $.ajax({
            url: "/user/findone",
            data: {},
            dataType: "json",
            type: "post",
            async: false,
            success: function (res) {
                if (res.errcode === "0"){

                    var host = location.host;
                    $(".layui-nav-img").attr("src", "http://" + host + "/" + res.data.IMG_URL);

                    $(".userName").html(res.data.NAME);

                } else if (res.errcode === "1"){
                    layer.msg(res.errmsg, function(){});
                }
            },
            error: function(XMLHttpRequest, textStatus, errorThrown) {
                console.error(XMLHttpRequest.status);
                console.error(XMLHttpRequest.readyState);
                console.error(textStatus);
            }
        });

        //将message设置为全局以便子页面调用
        message = layui.message;
        //主入口
        app.set({
            type: 'iframe'
        }).init();

        var clickType = QueryUtils.GetQueryString("type");
        $(".layui-nav-tree li a").each(function () {
            if ($(this).attr("id") == "item"+clickType){
                $(this).click();
            }
        });
//        $(".layui-nav-tree li a").eq(clickType).click();

        //更改皮肤
        $('dl.skin > dd').on('click', function () {
            var $that = $(this);
            var skin = $that.children('a').data('skin');
            switchSkin(skin);
        });
        var setSkin = function (value) {
                layui.data('kit_skin', {
                    key: 'skin',
                    value: value
                });
            },
            getSkinName = function () {
                return layui.data('kit_skin').skin;
            },
            switchSkin = function (value) {
                var _target = $('link[shs-skin]')[0];
                _target.href = _target.href.substring(0, _target.href.lastIndexOf('/') + 1) + value + _target.href.substring(_target.href.lastIndexOf('.'));
                setSkin(value);
            },
            initSkin = function () {
                var skin = getSkinName();
                switchSkin(skin === undefined ? 'default' : skin);
            }();
    });
    function changeTab(clickType) {
        $(".layui-nav-tree li a").each(function () {
            if ($(this).attr("id") == "item"+clickType){
                $(this).click();
            }
        });
    }
</script>
<script type="text/javascript" src="../../static/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="../../static/js/common/authUtils.js"></script>
</body>

</html>